/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package main;

import java.util.logging.Level;
import java.util.logging.Logger;
import model.Cliente;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import model.Filial;
import service.ClienteFacade;
import service.ClienteFacadeRemote;
import service.FilialFacadeRemote;

/**
 *
 * @author Omar
 */
public class MainTeste {

    public static void main(String args[]){

        try {
            Cliente e = new Cliente();
            e.setNome("Dih");
            Context ctx = new InitialContext();
            ClienteFacadeRemote cf = (ClienteFacadeRemote)ctx.lookup("ClienteBean");
            cf.create(e);

            System.out.println(cf.find(1));
        } catch (NamingException ex) {
            Logger.getLogger(MainTeste.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}
